<template>
    <div>
        <van-nav-bar
            :title="title"
            left-text="返回"
            left-arrow
            @click-left="onClickLeft"
        />
    </div>
</template>

<script>
export default {
    data() {
        return {
            parentPath:''
        };
    },
    watch:{
        $route:{
            handler(Val){
                // console.log(Val);
                this.parentPath=Val.meta.parentPath
            },
            deep:true,
            immediate:true
        }
    },
    computed:{
        title(){
            return this.$route.meta.title||''
        }
    },
    methods: {
        onClickLeft(){
            // this.$router.push(this.parentPath)
            this.$router.go(-1)
        }
    },
};
</script>
<style lang="scss">
</style>